@import "~pc/styles/lib_var.less";
@import "~pc/styles/lib_mixins.less";
@import "~pc/styles/lib_screen.less";

.headerPng {
  width: 100%;
  height: auto;
}

.container {
  display: flex;

  .tabs {
    display: flex;
    flex-direction: column;
    width: 192px;
    flex-shrink: 0;
    background: var(--static-primary-color);
    border-radius: 8px 0 0 8px;
    overflow: hidden;

    .tab {
      position: relative;
      min-height: 268px;
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      cursor: pointer;

      .tabContent {
        display: flex;
        flex-direction: column;
        align-items: center;
        transition: transform 0.3s ease-out;
      }

      &:hover {
        .tabContent {
          transform: scale(1.1);
        }
      }

      &.active {
        background: var(--deepPurple_600);

        .tabContent {
          transform: scale(1);
        }

        &::after {
          content: "";
          display: block;
          width: 14px;
          height: 14px;
          border-radius: 2px;
          background: var(--defaultBg);
          transform: rotate(45deg);
          position: absolute;
          right: -8px;
        }
      }

      img {
        width: auto;
        height: 80px;
      }

      .title {
        font-size: 15px;
        font-weight: bold;
        color: var(--static-white);
        padding-top: 16px;
      }

      .subTitle {
        font-size: 13px;
        color: rgba(var(--static-white-rgb), 80%);
        padding-top: 4px;
      }
    }
  }

  .tabPanel {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    height: 563px;
    padding: 24px 0 24px 24px;

    .nodeTitle {
      font-size: 20px;
      font-weight: bold;
      display: flex;
      align-items: center;
      padding-right: 24px;
      color: var(--fc1);

      .name {
        max-width: 400px;
        .ellipsis();
      }
    }

    .main {
      flex: 1;
      min-height: 0;
    }
  }
}

/** Mobile */
.shareNodeDrawer {
  .nodeTitle {
    display: flex;
    align-items: center;

    .name {
      max-width: 200px;
      .ellipsis();
    }
  }

  .tabs {
    height: 100%;

    :global {
      .ant-tabs-tab {
        padding: 0 0 12px;
        color: var(--secondLevelText);
      }

      .ant-tabs-tab-active {
        font-weight: bold;
      }

      .ant-tabs-nav {
        margin: 0;
      }

      .ant-tabs-content-holder {
        height: calc(100% - 34px);
      }

      .ant-tabs-pane {
        height: 100%;
      }

      .ant-tabs-content {
        height: 100%;
      }
    }
  }
}
.displayAlignCenter {
  display: flex;
  align-items: center;
}

.shareContent {
  border-radius: 8px;
  padding: 24px 24px 0px;
  box-shadow: var(--shadowCommonHighest);
  background-color: var(--bgCommonHighest);

  &.loading {
    padding-bottom: 36px;
  }

  .shareFloor {
    .displayAlignCenter();
    svg {
      fill: var(--fc3);
    }
    a {
      line-height: 1;
    }
  }

  .shareTitle {
    padding-bottom: 16px;
    span {
      font-size: 14px;
      margin-right: 4px;
    }
  }

  .shareInvite {
    padding-bottom: 16px;
    .shareInviteWrap {
      flex: 1;
      margin-right: 16px;
    }

    .shareInvitePrefix {
      padding-right: 8px;
      .displayAlignCenter();
    }
  }

  .shareInviteAuth {
    position: relative;
    cursor: pointer;
    .displayAlignCenter();

    svg {
      transition: all .3s;
    }

    &.shareInviteAuthOpen {
      svg {
        transform: rotate(-180deg);
      }
    }

    &::before {
      content: '';
      width: 1px;
      height: 16px;
      background-color: var(--borderCommonDefault);
      display: block;
      position: absolute;
      top: 50%;
      left: 0;
      transform: translateY(-50%);
    }

    span {
      margin: 0 8px;
    }
  }

  .collaborator {
    justify-content: space-between;
    padding-bottom: 40px;

    .collaboratorStatus {
      padding: 4px;
      border-radius: 4px;
      transition: all .3s;
      cursor: pointer;
      .displayAlignCenter();

      &:hover {
        background-color: var(--bgBglessHover);
      }
    }

    .collaboratorNumber {
      color: var(--textCommonSecondary);
    }

    .collaboratorAuth {
      color: var(--textCommonSecondary);
      cursor: pointer;
      .displayAlignCenter();
    }

    .collaboratorIcon {
      margin-right: 8px;
      position: relative;
      .displayAlignCenter();

      .collaboratorIconItem {
        position: relative;
      }
    }


    &.collaboratorUnderline {
      padding-bottom: 15px;
      .collaboratorNumber {
        text-decoration: underline;
      }
    }
  }

  .collaboratorList {
    height: 400px;
  }
}

.shareMoreInvitor {
  height: 40px;
  font-size: 14px;
  color: var(--textCommonSecondary);
  cursor: pointer;
  justify-content: center;
  transition: all .3s;
  .displayAlignCenter();


  &:hover {
    background-color: var(--rowSelectedBg);
  }
}

.emptyEmail {
  padding-top: 9px !important;
  color: var(--textCommonSecondary) !important;
  text-align: center !important;
  cursor: default;
}

.shareInviteEmpty {
  text-align: center;
  padding: 65px 0;

  .shareInviteEmptyText {
    width: 242px;
    margin: 16px auto 0 auto;
    color: var(--textCommonSecondary);
  }
}

.shareInputTag {
  border-radius: 12px;
  margin: 4px;
  svg {
    font-size: 12px;
    width: 12px;
    height: 12px;
    margin-left: 6px;
    cursor: pointer;
  }
}

@media screen and (max-width: @w-md) {
  .shareContent {
    padding: 0;
    background-color: transparent;
    box-shadow: none;
  }

  .collaboratorMobile {
    :global {
      .ant-drawer-wrapper-body, .ant-drawer-header, .ant-drawer-body {
        background-color: var(--bgCommonLower);
      }
    }
  }
}
